import type { AxiosInstance, AxiosRequestConfig, AxiosResponse } from "axios";
// 请求拦截器
export interface RequestInterceptors<T = AxiosResponse> extends AxiosInstance {
  //请求拦截器
  requestInterceptor?: (config: AxiosRequestConfig) => AxiosRequestConfig;
  //请求拦截器捕获
  requestInterceptorCatch?: (error: any) => any;
  //响应拦截器
  responseInterceptor?: (res: T) => T;
  //响应拦截器捕获
  responseInterceptorCatch?: (error: any) => any;
}
//请求配置
export interface RequestConfig<T = AxiosResponse> extends AxiosRequestConfig {
  interceptors?: RequestInterceptors<T>;
  showLoading?: boolean;
  isResponse?: boolean;
}
